-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempts to access non-existent CSRs are reserved #1207
Conversation
If there is an attempt to access a non-existent CSR (or write a
non-existent CSR in the Read-only region) - is there no guarantee even then
that it will get an illegal instruction exception?
Or, it is guaranteed only for implemented CSRs at an insufficient priv
level? (i.e. which has higher priority, insufficient priv or unimplemented)?
I would vote for insufficient priv level here.....
…On Sun, Jan 28, 2024 at 7:24 PM Andrew Waterman ***@***.***> wrote:
Resolves #1116 <#1116>
------------------------------
You can view, comment on, or merge this pull request online at:
#1207
Commit Summary
- 018a901
<018a901>
Attempts to access non-existent CSRs are reserved
File Changes
(1 file </~https://github.com/riscv/riscv-isa-manual/pull/1207/files>)
- *M* src/priv-csrs.adoc
</~https://github.com/riscv/riscv-isa-manual/pull/1207/files#diff-9babc2ac9f6753b391e6584ce856baf203f206cb43bc0d3a8a8d5878ed748b7e>
(6)
Patch Links:
- /~https://github.com/riscv/riscv-isa-manual/pull/1207.patch
- /~https://github.com/riscv/riscv-isa-manual/pull/1207.diff
—
Reply to this email directly, view it on GitHub
<#1207>, or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/AHPXVJWOKSXH7JMY6CIN6WDYQ4I5BAVCNFSM6AAAAABCOW4BAWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDINJWGAZTSMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Unimplemented CSRs don’t have a defined privilege level, so they can’t trap on the basis of privilege. (The use of bits 9:8 for privilege is just a convention, as is the use of bits 11:10 for writability. The priv spec could in principle contravene these conventions at any time, even though that would be a deeply unfortunate thing to do.) |
Hmm; given the description of the regions in the spec, I thought of it as
far more than a convention, but more like a ... spec.
…On Sun, Jan 28, 2024 at 10:08 PM Andrew Waterman ***@***.***> wrote:
Unimplemented CSRs don’t have a defined privilege level, so they can’t
trap on the basis of privilege (The use of bits 9:8 for privilege is just a
convention, as is the use of bits 11:10 for writability.)
—
Reply to this email directly, view it on GitHub
<#1207 (comment)>,
or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/AHPXVJUJ4FF56TK6HEWCI7TYQ44HDAVCNFSM6AAAAABCOW4BAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUGAZDGNBZGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The relevant sentence begins with the words "by convention". |
018a901
to
1436722
Compare
1436722
to
516685d
Compare
Notably, the ratified debug 0.13 spec did not follow that convention. The mscontext CSR in debug 1.0 continues to not follow that convention but it's now deprecated and replaced by something that follows the convention. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Resolves #1116